package com.musemun.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 *  为了批量出库准备
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OutExcel implements Serializable {

    private static final long serialVersionUID = 1L;

    //-------外借信息表---------------
    @ExcelProperty("crNo")
    private Long crNo;
    @ExcelProperty("LCName")
    private String LCName;
    @ExcelProperty("LSDate")
    private Date LSDate;
    @ExcelProperty("LEDate")
    private Date LEDate;
    @ExcelProperty("Remarks")
    private String qwe;
    //-------END--------------------

    //-------操作记录表---------------
    @ExcelProperty("eNo")
    private Integer aaaaqq;
    @ExcelProperty("opType")
    private String opType;
    //-------END--------------------

    //-------外借联系人表-------------
    @ExcelProperty("Remarks2")
    private String asd;
    //-------END--------------------

    public Lendcontact getLendcontact() {
        Lendcontact lendcontact = new Lendcontact(LCName, asd);
        return lendcontact;
    }

    public Cropifo getCropifo() {
        Cropifo cropifo = new Cropifo(crNo, aaaaqq, "出库", new Date());
        return cropifo;
    }

    public Crlendifo getCrlendifo() {
        Crlendifo crlendifo = new Crlendifo(crNo, LCName, LSDate, LEDate, qwe);
        return crlendifo;
    }

    public boolean check() {
        if (this.aaaaqq == null && this.asd == null && this.crNo == null
                && this.LCName == null && this.LEDate == null
                && this.LSDate == null && this.opType == null
                && this.qwe == null) {
            return false;
        }
        return true;
    }
}
